<?php
function entity_import_lookup_user_name_as_uid(Infinity\Entity &$entity, $field, array $value, array $field_data) {
  $user = user_load_by_name($value[0]);
  if($field == 'uid')
    $entity->uid = $user->uid;
  else
    $entity->fieldManager()->setValue($field, 'uid', $user->uid);
}